import 'package:flutter/material.dart';

class MyApp19 extends StatelessWidget {
  const MyApp19({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("GridView.extent")),
      body: GridView.extent(
        maxCrossAxisExtent: 100,
        childAspectRatio: 1,
        crossAxisSpacing: 10,
        mainAxisSpacing: 10,
        children: [
          Container(
            color: Colors.red,
            alignment: Alignment.center,
            child: const Text('传智播客1'),
          ),
          Container(
            color: Colors.orange,
            alignment: Alignment.center,
            child: const Text('传智播客2'),
          ),
          Container(
            color: Colors.yellow,
            alignment: Alignment.center,
            child: const Text('传智播客3'),
          ),
          Container(
            color: Colors.green,
            alignment: Alignment.center,
            child: const Text('传智播客4'),
          ),
          Container(
            color: Colors.cyan,
            alignment: Alignment.center,
            child: const Text('传智播客5'),
          ),
          Container(
            color: Colors.blue,
            alignment: Alignment.center,
            child: const Text('传智播客6'),
          ),
          Container(
            color: Colors.purple,
            alignment: Alignment.center,
            child: const Text('传智播客6'),
          ),
        ],
      ),
    );
  }
}
